Conversation
* chore: add test step in prs - Fixed jest setup to work with lodash-es using babel * feat: measuring layout is now async * refactor: rename layout adapter constants and introduce getBoundingClientRectAdapter * chore: add changeset * docs: update SpatialNavigation and related guides to reflect deprecation of useGetBoundingClientRect and introduce layoutAdapter for improved layout measurement * fix: replace unused layoutUpdate with layoutUpdatedAt timestamp to avoid unnecessary layout updates * feat: implement Scheduler class * fix: await smartNavigate in SpatialNavigationService to ensure proper asynchronous behavior * refactor: setFocus async * fix: handle undefined currentTask in Scheduler * fix: correct layout update condition in SpatialNavigationService to ensure proper component updates * docs: document Scheduler class changees * fix: initialize layoutUpdatedAt in SpatialNavigationService to ensure proper layout updates * fix: ensure currentTask is not triggered twice * fix: revert previous changes. Remove tick from priority tasks, add a try / finally block to the currentTask execution
* chore: update ESLint configuration to disable rules * feat: expand LayoutAdapter interface and refactor SpatialNavigationService to support custom event listeners * refactor: implement blurNode and update focusNode methods in LayoutAdapter for improved spatial navigation handling * feat: re-export adapters * docs: update SpatialNavigation and debugging guides to reflect new layout adapter usage * fix: await smartNavigate in keyDownEventListener to ensure proper behavior * fix: ensure data-focused attribute is set * feat: remove support for LayoutAdapter instance, use constructor option instead
* feat: add NodeType interface and update FocusableComponent to support custom node types * feat: introduce ReactNativeLayoutAdapter * refactor: update ReactNativeLayoutAdapter to conditionally export based on platform * refactor: remove nativeMode from SpatialNavigationService and related options - Eliminated nativeMode property from SpatialNavigationServiceOptions and its usage throughout the service. - Updated related logic to ensure functionality remains intact without nativeMode. - Cleaned up code for improved readability and maintainability. * docs: enhance React Native TV support and update related documentation - Updated README.md to reflect full support for Android TV and Apple TV using the `@noriginmedia/norigin-spatial-navigation-react-native` package. - Revised SpatialNavigation.md to clarify the use of layout adapters and introduced new sections for React Native TV, including installation and initialization instructions. - Expanded useFocusable.md to specify the differences in ref handling between web and React Native TV. - Added a new guide for React Native TV detailing setup and usage. - Adjusted installation.md to include peer dependencies for React Native TV. * feat: add NodeTypeOverrides interface and enhance ReactNativeLayoutAdapter for improved customization * fix: add missing external dependencies in rollup configuration for React Native * fix: resolve undefined layout for Android TV with EMPTY_LAYOUT constant * chore: update TypeScript configuration for React Native to skip library checks
…rt for platform-specific adapter
…ing with React Native Web (#230) * feat: enhance rollup configuration and add web-specific entry point - Updated rollup configuration to support separate builds for web and common JS formats. - Added new entry point for web-specific functionality in src/index.web.ts. - Updated package.json exports to include web module paths.
* feat: add navigationStrategy to FocusableComponent and update SpatialNavigationService for custom navigation handling * refactor: rename navigationStrategy to nextFocusResolver * Create hot-falcons-begin.md * fix: add warning for invalid component in nextFocusResolver to prevent lost focus * Update packages/core/src/SpatialNavigation.ts Co-authored-by: Dmitriy Bryokhin <2877657+asgvard@users.noreply.github.com> --------- Co-authored-by: Dmitriy Bryokhin <2877657+asgvard@users.noreply.github.com>
🦋 Changeset detectedLatest commit: eb5d699 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
predikament
approved these changes
Jun 22, 2026
predikament
left a comment
Collaborator
There was a problem hiding this comment.
Forgot to leave my review when I checked this earlier - Looks fine to me 👍🏻
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch bundles the next major release of the spatial navigation packages. The headline changes are first-class React Native TV support via a new adapter package, a move to async layout measurement in core, and a new
nextFocusResolverhook for overriding focus decisions. It also removes the oldnativeModeflag in favor of adapter-based platform selection.What's changed
New features
@noriginmedia/norigin-spatial-navigation-react-native-tvos, withReactNativeLayoutAdapterthat wires native layout measurement and remote/D-pad input into the sameuseFocusableAPI used on the web. docs/guides/react-native-tv.mdmeasureLayoutand the internal focus pipeline now operate asynchronously. A newSchedulerclass in packages/core/src/Scheduler.ts guarantees that async tasks run in strict order so focus races are avoided.useGetBoundingClientRectinit flag with alayoutAdapteroption. Core now exportsBaseWebAdapterandGetBoundingClientRectAdapterfor custom or legacy web setups. packages/core/src/adapter/web.tsnextFocusResolver— focusable nodes can now override the engine's default directional choice by returning a custom focus key fromnextFocusResolver(direction, focusDetails). docs/api-reference/useFocusable.mdBreaking changes
init({ nativeMode: true })init({ layoutAdapter: ReactNativeLayoutAdapter })init({ useGetBoundingClientRect: true })init({ layoutAdapter: GetBoundingClientRectAdapter })(still accepted but deprecated)SpatialNavigationService.isNativeMode()layoutAdapterinsteadmeasureLayoutmeasureLayout